package cn.dujc.superkid.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * @author du
 * date 2018/7/29 下午1:39
 */
public class MyAskResult extends ListDataEntity implements Parcelable{
    private List<MyAskEntity> list;

    public List<MyAskEntity> getList() { return list;}

    public void setList(List<MyAskEntity> list) { this.list = list;}

    @Override
    public int describeContents() { return 0; }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeTypedList(this.list);
    }

    public MyAskResult() {}

    protected MyAskResult(Parcel in) {
        super(in);
        this.list = in.createTypedArrayList(MyAskEntity.CREATOR);
    }

    public static final Creator<MyAskResult> CREATOR = new Creator<MyAskResult>() {
        @Override
        public MyAskResult createFromParcel(Parcel source) {return new MyAskResult(source);}

        @Override
        public MyAskResult[] newArray(int size) {return new MyAskResult[size];}
    };

    public static class MyAskEntity implements Parcelable{
        /**
         * id : 24
         * problem_posttime : 1485782953
         * problem_content : 一年级百分大法b卷第10题，答案格式不对，系统判错了，请更正下
         * answer_teacher_id : 19
         * answer_posttime : 1485859046
         * answer_content : <p>您好，第10题的答案格式没有错误，填写答案时要注意：最后填写的答案前面不能有空格，或后面有空格，这样系统都会判错。还有我们的试卷有专门的留言区，在线答疑这个模块是解答网站建议、功能建议的地方，谢谢配合哦！</p><p><img src="http://7xu137.com1.z0.glb.clouddn.com/ueditor_20170131_589068916d7d7.png" title="QQ图片20170131183546.png" alt="QQ图片20170131183546.png" width="760" height="383" style="width: 760px; height: 383px;"/></p>
         * status : 2
         */

        private String id;//问题id
        private String problem_posttime;//提问时间
        private String problem_content;//提问内容
        private String answer_teacher_id;//回答问题老师id
        private String answer_posttime;//回答问题时间
        private String answer_content;//回答问题内容
        private String status;//状态(1-未回复，2-已回复)
        private String problem_username;//提问提的名字
        private String problem_avatar;//提问题的头像
        private String answer_teacher_nicename;//回答问题的老师名字
        private String answer_teacher_avatar;//回答问题的老师头像

        public String getProblem_username() {
            return problem_username;
        }

        public void setProblem_username(String problem_username) {
            this.problem_username = problem_username;
        }

        public String getProblem_avatar() {
            return problem_avatar;
        }

        public void setProblem_avatar(String problem_avatar) {
            this.problem_avatar = problem_avatar;
        }

        public String getAnswer_teacher_nicename() {
            return answer_teacher_nicename;
        }

        public void setAnswer_teacher_nicename(String answer_teacher_nicename) {
            this.answer_teacher_nicename = answer_teacher_nicename;
        }

        public String getAnswer_teacher_avatar() {
            return answer_teacher_avatar;
        }

        public void setAnswer_teacher_avatar(String answer_teacher_avatar) {
            this.answer_teacher_avatar = answer_teacher_avatar;
        }

        public String getId() { return id;}

        public void setId(String id) { this.id = id;}

        public String getProblem_posttime() { return problem_posttime;}

        public void setProblem_posttime(String problem_posttime) { this.problem_posttime = problem_posttime;}

        public String getProblem_content() { return problem_content;}

        public void setProblem_content(String problem_content) { this.problem_content = problem_content;}

        public String getAnswer_teacher_id() { return answer_teacher_id;}

        public void setAnswer_teacher_id(String answer_teacher_id) { this.answer_teacher_id = answer_teacher_id;}

        public String getAnswer_posttime() { return answer_posttime;}

        public void setAnswer_posttime(String answer_posttime) { this.answer_posttime = answer_posttime;}

        public String getAnswer_content() { return answer_content;}

        public void setAnswer_content(String answer_content) { this.answer_content = answer_content;}

        public String getStatus() { return status;}

        public void setStatus(String status) { this.status = status;}

        @Override
        public int describeContents() { return 0; }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.id);
            dest.writeString(this.problem_posttime);
            dest.writeString(this.problem_content);
            dest.writeString(this.answer_teacher_id);
            dest.writeString(this.answer_posttime);
            dest.writeString(this.answer_content);
            dest.writeString(this.status);
            dest.writeString(this.problem_username);
            dest.writeString(this.problem_avatar);
            dest.writeString(this.answer_teacher_nicename);
            dest.writeString(this.answer_teacher_avatar);
        }

        public MyAskEntity() {}

        protected MyAskEntity(Parcel in) {
            this.id = in.readString();
            this.problem_posttime = in.readString();
            this.problem_content = in.readString();
            this.answer_teacher_id = in.readString();
            this.answer_posttime = in.readString();
            this.answer_content = in.readString();
            this.status = in.readString();
            this.problem_username = in.readString();
            this.problem_avatar = in.readString();
            this.answer_teacher_nicename = in.readString();
            this.answer_teacher_avatar = in.readString();
        }

        public static final Creator<MyAskEntity> CREATOR = new Creator<MyAskEntity>() {
            @Override
            public MyAskEntity createFromParcel(Parcel source) {return new MyAskEntity(source);}

            @Override
            public MyAskEntity[] newArray(int size) {return new MyAskEntity[size];}
        };
    }
}
